1 00:00:00,420 --> 00:00:02,970 Hello and welcome to this lecture. 2 00:00:03,240 --> 00:00:11,770 In this lecture we'll be creating variables for the paddle's right and left movement. 3 00:00:11,820 --> 00:00:20,520 So what we're trying to do is store some information one capture some information when the right keyboard 4 00:00:20,550 --> 00:00:27,120 a button is pressed or when the left keyboard or button is pressed. 5 00:00:27,240 --> 00:00:31,580 We want that recorded in a variable. 6 00:00:31,580 --> 00:00:40,950 All right let's create two variables that will capture or store information when they are right or left. 7 00:00:40,960 --> 00:00:44,660 Control button or keyboard is pressed. 8 00:00:44,940 --> 00:00:50,160 So the first one to create is where the rest of the variables are. 9 00:00:50,160 --> 00:00:59,570 This is my scrip So I just tab down and defined a variable with the word var the heart. 10 00:00:59,910 --> 00:01:02,940 And I'm going to call it right 11 00:01:08,010 --> 00:01:08,730 Prest 12 00:01:12,600 --> 00:01:20,400 always a good idea to name a variable as closely as possible to the action you're trying to represent. 13 00:01:20,400 --> 00:01:23,110 So this variable is called right. 14 00:01:23,130 --> 00:01:34,030 Pressed it will capture or any information when the right button or the right keyboard rule is pressed. 15 00:01:34,150 --> 00:01:41,760 So value will be false. 16 00:01:41,850 --> 00:01:47,450 This is a bully and value bullion value remains is either true or false. 17 00:01:47,520 --> 00:01:57,960 The default is false because when the button or the right keyboard is at rest there is no it no information 18 00:01:57,960 --> 00:01:59,570 is stored will not happen. 19 00:01:59,580 --> 00:02:01,110 Hence it is false. 20 00:02:01,380 --> 00:02:07,000 The moment it begins or capture some information then it becomes true. 21 00:02:07,020 --> 00:02:12,530 So let's create a variable for the left breast key. 22 00:02:12,880 --> 00:02:14,600 So type in 23 00:02:17,910 --> 00:02:18,600 left 24 00:02:21,790 --> 00:02:26,800 breast and the value will be force. 25 00:02:28,090 --> 00:02:38,280 The default for this too is false because when nothing happens when it's at rest there is no activity 26 00:02:38,580 --> 00:02:44,010 as it is force so there's nothing to store in the variable. 27 00:02:44,090 --> 00:02:52,620 The moment there is activity when you start pressing the right button or the right keyboard arrow then 28 00:02:52,650 --> 00:03:00,400 very it changes dutroux which means there is some activity class sit for this lecture. 29 00:03:00,420 --> 00:03:10,110 We have created two extra variables that will store information relating to rights key board control 30 00:03:10,500 --> 00:03:13,460 or right button control. 31 00:03:13,710 --> 00:03:23,580 Similarly with l.f. keep us control or left button control so when either the right or left key pressed 32 00:03:24,330 --> 00:03:33,750 it will store some information what the default value is false because when it is resting nothing happens 33 00:03:33,750 --> 00:03:36,840 so there's no need to capture any information. 34 00:03:37,080 --> 00:03:39,150 Thank you so much for your time. 35 00:03:39,150 --> 00:03:40,330 Bye for now.